package com.nidu.demo.user.model;

import com.nidu.demo.base.BaseTenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class UserRole extends BaseTenantEntity {
    private Long id;
    private Long userId;
    private Long roleId;

    public static UserRole create(Long userId, Long roleId){
        UserRole userRole = new UserRole();
        userRole.setUserId(userId)
                .setRoleId(roleId);
        return userRole;
    }
}